package com.yuandian.customer.perception.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuandian.api.customer_perception.po.BusinessPerformanceParams;
import com.yuandian.api.customer_perception.po.InterfacePerformanceParams;
import com.yuandian.api.customer_perception.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 说明：接口性能优化mapper
 *
 */
@Mapper
public interface InterfacePerformanceMapper {

    //@SqlAlias(value = "性能优化-接口性能优化-具体用户接口URL")
    List<SpecificUserInterfaceVo> querySpecificOperatorList(Page<SpecificUserInterfaceVo> page,
															@Param("params") BusinessPerformanceParams params);

    //@SqlAlias(value = "性能优化-接口性能优化-查询用户轨迹操作趋势")
    List<OperatorTrajectoryVisitCountTrendVo> queryOperatorTrajectoryTrend(@Param("params") BusinessPerformanceParams params);

    //@SqlAlias(value = "性能优化-接口性能优化-查询接口性能变化趋势")
    List<ImplementPerformanceTrendVo> queryImplementPerformanceTrend(@Param("params") BusinessPerformanceParams params);


    /**
     * 查询接口健康度Top10
     * @param params
     * @param tableInfos
     * @return List(interfaceHealThRateTopVo)
     */
    //@SqlAlias("性能优化-接口性能优化-查询接口健康度Top10")
    List<InterfaceHealThRateTopVo> queryInterfaceHealthRateTop10(@Param("params") InterfacePerformanceParams params);

    /**
     * 查询接口URL运行概况总览
     * @param params
     * @param tableInfos
     * @return List(interfaceHealThRateTopVo)
     */
    //@SqlAlias("性能优化-接口性能优化-查询接口URL运行概况总览")
    List<InterfaceURLPerformanceVo> queryInterfaceURLPerformance(@Param("params") InterfacePerformanceParams params);

    /**
     * 查询全部速度区间
     * @param
     * @return List(SpeedRangeVo)
     */
    //@DS("systemData")
    //@SqlAlias("性能优化-接口性能优化-查询全部速度区间")
    List<SpeedRangeVo> queryAllSpeedRange();

    /**
     * 查询关联业务
     *
     * @param params(businessCode,startTime,endTime)
     * @param tableInfos
     * @return PageDataInfo(InterfaceURLPerformanceVo)
     */
    //@SqlAlias("性能优化-接口性能优化-查询关联业务")
    List<RelatedBusinessVo> queryRelatedBusiness(@Param("params") InterfacePerformanceParams params);

    /**
     * 查询业务编码集合
     *
     * @param params
     * @param tableInfo
     * @return List<List<String>>
     */
    //@SqlAlias("性能优化-接口性能优化-查询业务编码集合")
    List<String> queryBusinessCodes(@Param("params") InterfacePerformanceParams params);

    /**
     * 查询全部接口url
     *
     * @param params
     * @param tableInfos
     * @return List<String>
     */
    //@SqlAlias("性能优化-接口性能优化-查询全部接口url")
    List<String> queryAllUrl(@Param("params") InterfacePerformanceParams params);

    /**
     * 查询空置的接口
     * @return
     * @param params
     * @param tableInfos
     */
    //@DS("systemData")
    //@SqlAlias("性能优化-接口性能优化-查询空置的接口")
    List<InterfaceHealThRateTopVo> queryInterfaceFreeState(@Param("params") InterfacePerformanceParams params);

    /**
     * 根据时间查询在用接口
     * @param params
     * @param tableInfos
     * @return
     */
    //@DS("khgzData")
    //@SqlAlias("性能优化-接口性能优化-根据时间查询在用接口")
    List<String> queryUseringInterfaceByTime(@Param("params") InterfacePerformanceParams params);

	/**
	 * 用户轨迹趋势图-获取指定用户标识指定时间指定URL的办理时长
	 * @param params
	 * @return
	 */
    List<OperatorTrajectoryDealTimeTrendVo> getDealTimeList(@Param("params") BusinessPerformanceParams params);

	/**
	 * 用户操作轨迹列表
	 * @param page
	 * @param params
	 * @return
	 */
	Page<UserOperationTrajectoryVo> queryUserOperationTrajectory(@Param("page") IPage<UserOperationTrajectoryVo> page, @Param("params") InterfacePerformanceParams params);
}
